package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.vo.PatientRegisterReturnMoneyResultVo;
import com.mk.admin.model.vo.*;
import com.mk.admin.service.PayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/pay")
@Api(tags = "结算类")
public class PayController {
    @Autowired
    private PayService payService;

    @PostMapping("/patientRegisterBudget")
    @ApiOperation("stt_0001门诊挂号预算")
    public ResultDto patientRegisterBudget(@RequestBody PatientRegisterBudgetVo vo) {
        return payService.patientRegisterBudget(vo);
    }

    @PostMapping("/patientRegisterSettlement")
    @ApiOperation("stt_0002门诊挂号结算  (调用成功后 三方厂商需要自己再调用opt_0013来确认his是否真的已存库)")
    public ResultDto patientRegisterSettlement(@RequestBody PatientRegisterSettlementVo vo) {
        return payService.patientRegisterSettlement(vo);
    }

    @PostMapping("/patientFeeBudget")
    @ApiOperation("stt_0003门诊收费预算（非药品多批次多价格药品处方可以用）")
    public ResultDto patientFeeBudget(@RequestBody PatientFeeBudgetVo vo) {
        return payService.patientFeeBudget(vo);
    }

    @PostMapping("/patientFeeSettlement")
    @ApiOperation("stt_0004门诊收费结算 (调用成功后 三方厂商需要自己再调用opt_0013来确认his是否真的已存库)")
    public ResultDto patientFeeSettlement(@RequestBody PatientFeeSettlementVo vo) {
        return payService.patientFeeSettlement(vo);
    }

    @PostMapping("/patientRegisterReturnMoney")
    @ApiOperation("stt_0006门诊挂号退费")
    public ResultDto patientRegisterReturnMoney(@RequestBody PatientRegisterReturnMoneyVo vo) {
        return payService.patientRegisterReturnMoney(vo);
    }

    @PostMapping("/patientRegisterReturnNo")
    @ApiOperation("stt_0007门诊挂号退号")
    public ResultDto patientRegisterReturnNo(@RequestBody PatientRegisterReturnNoVo vo) {
        return payService.patientRegisterReturnNo(vo);
    }

    @PostMapping("/patientRegisterReturnMoneyResult")
    @ApiOperation("stt_0008门诊挂号退费结果通知")
    public ResultDto patientRegisterReturnMoneyResult(@RequestBody PatientRegisterReturnMoneyResultVo vo) {
        return payService.patientRegisterReturnMoneyResult(vo);
    }

}
